{include file=member.header.html}
<style>
.borline td { padding:10px 0px; }
.ware_list th { text-align:left; }
</style>
<script type="text/javascript">

$(function(){
    $('#profile_form').validate({
        errorPlacement: function(error, element){
            $(element).parent('span').parent('b').after(error);
        },
        rules : {
            portrait : {
                accept   : 'gif|jpe?g|png'
            }
        },
        messages : {
            portrait  : {
                accept   : '{$lang.avatar}'
            }
        }
    });
    $('input[ectype="change_avatar"]').change(function(){

        var src = getFullPath($(this)[0]);
        $('img[ectype="avatar"]').attr('src', src);
        $('input[ectype="change_avatar"]').removeAttr('name');
        $(this).attr('name', 'portrait');
    });
});
</script>
<div class="content">
    {include file=member.menu.html}
    <div id="right">
            {include file=member.submenu.html}
            <div class="wrap">
                <div class="public">
                <form method="post" enctype="multipart/form-data" id="profile_form">
                    <div class="information">
                        <!--{if !$edit_avatar}-->
                        <div class="photo width13">
                            <p><img src="<!--{if $profile.portrait}-->{$profile.portrait}?{$random_number}<!--{else}-->{$site_url}/data/system/default_user_portrait.gif<!--{/if}-->" width="120" height="120" alt="" ectype="avatar" /></p>
                            <b>
                                <span class="file1"><input type="file" size="1" maxlength="0" hidefocus="true" ectype="change_avatar" name="portrait1" /></span>
                                <span class="file2"><input type="file" size="1" maxlength="0" hidefocus="true" ectype="change_avatar" name="portrait2" /></span>
                                <div class="txt">{$lang.change_portrait}</div>
                            </b>
                        </div>
                        <!--{/if}-->
                        <div class="info individual">
                            <table>
                                <tr>
                                    <th class="width4">{$lang.user_name}: </th>
                                    <td>{$profile.user_name|escape}</td>
                                </tr>
                                <tr>
                                    <th>{$lang.email}:</th>
                                    <td>{$profile.email}</td>
                                </tr>
                                <tr>
                                    <th>{$lang.real_name}:</th>
                                    <td><input type="text" class="text width_normal" name="real_name" value="{$profile.real_name|escape}" /></td>
                                </tr>
                                <tr>
                                    <th>{$lang.gender}: </th>
                                    <td class="label">
                                        <label>
                                           <input type="radio" name="gender" value="0" {if $profile.gender eq 0}checked="checked"{/if} />{$lang.unknown}  </label>
                                            <label>
                                            <input type="radio" name="gender" value="1" {if $profile.gender eq 1}checked="checked"{/if} />{$lang.male}   </label>
                                            <label>
                                            <input type="radio" name="gender" value="2" {if $profile.gender eq 2}checked="checked"{/if} />{$lang.female} </label>
                                    </td>
                                </tr>
                                <tr>
                                    <th>{$lang.birthday}: </th>
                                    <td>
                                        <input type="text" class="text width_normal" name="birthday" id="birthday" value="{$profile.birthday|escape}" />
                                    </td>
                                </tr>
                                <tr>
                                    <th>{$lang.im_qq}:</th>
                                    <td> <input type="text" class="text width_normal" name="im_qq" value="{$profile.im_qq|escape}" /></td>
                                </tr>
                                <tr>
                                    <th>{$lang.im_msn}:</th>
                                    <td><input type="text"  class="text width_normal"name="im_msn" value="{$profile.im_msn|escape}" /></td>
                                </tr>
                                <!--{if $edit_avatar}-->
                                <tr>
                                    <th>{$lang.portrait}:</th>
                                    <td>{$edit_avatar}</td>
                                </tr>
                                <!--{/if}-->
                                <tr>
                                    <th></th>
                                    <td><input type="submit" class="btn" value="{$lang.save_edit}" /></td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </form>
                </div>
                <div class="wrap_bottom"></div>
            </div>

            <div class="clear"></div>
            <div class="adorn_right1"></div>
            <div class="adorn_right2"></div>
            <div class="adorn_right3"></div>
            <div class="adorn_right4"></div>
        </div>
        <div class="clear"></div>
    </div>
</div>
{include file=footer.html}
